package com.novice.elasticsearch.controller;

import com.novice.elasticsearch.domain.entity.Hotel;
import com.novice.elasticsearch.service.IHotelService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/hotel")
public class HotelController {
    @Resource
    private IHotelService hotelService;
    @RequestMapping("/index")
    public Hotel index() {
        Hotel hotel = hotelService.getById(36934L);
        return hotel;
    }
}
